// 这个是用来干嘛的 就是给表单提供数据的
import { reactive } from 'vue'
import { UserAddModel } from '@/api/user/UserModel'
export default function useBaseModel() {
  const rules = reactive({
    name: [{
      required: true,
      message: '请填写阶段名称',
      trigger: 'blur',
    }],
    username: [{
      required: true,
      message: '请填写登录用户名',
      trigger: 'blur',
    }],
    password: [{
      required: true,
      message: '请填写登录密码',
      trigger: 'blur',
    }],
  })

  const dialogModel = reactive<UserAddModel>({
    name: '',
    username: '',
    departmentId: '',
    email: '',
    gender: '',
    password: '',
    phone: '',
    positionId: '',
    id: ''
  })
  const options = reactive([
    {
      value: '1',
      label: '男',
    },
    {
      value: '0',
      label: '女',
    }
  ])
  return {
    rules, dialogModel, options
  }
}